import React from 'react';

const ApiList = ({ apiListData }) => (
  <div>
    {
      apiListData.map(item => (
        <div key={item.api}>
          <span style={{ marginRight: 20 }}>{item.method}:</span>
          <a href={item.api}>{item.api}</a>
          {
            item.title && <span style={{ marginLeft: 20 }}>{item.title}</span>
          }
        </div>
      ))
    }
  </div>
);

export default ApiList;
